package com.riant.dayo2.demo6;

import java.util.Comparator;

/**
 * @Classname LengthComparator
 * @Description TODO
 * @Date 2021/2/28 0:50
 * @Created by 张斌
 */
public class LengthComparator implements Comparator<String> {
    @Override
    public int compare(String o1, String o2) {
        return o1.length()-o2.length();
    }
}
